﻿@model IEnumerable<RecommendItem>
@{
    IUser currentUser = UserContext.CurrentUser;      
}

     <p class="tbg2">
         @if (new Authorizer().RecommendItem_Manage(TenantTypeIds.Instance().User()))
{
    <a href="@SiteUrls.Instance()._ManageRecommendItems("00001101", false)" plugin="dialog" class="fr">
        管理>>
    </a>
}
    <span class="t1 fl">缘分天天</span></p>  <!--标题-->
            <div class="mcon1">
@if (Model != null && Model.Count() > 0)
 {
                <!--缘分天天开始-->
                foreach (var item in Model)
                {
                var user = item.GetFullUser();
                if (user == null)
                {
                continue;
                }  
                <div class="fw01">
                    <div class="fw-pho">
                        @Html.ShowUserAvatar(item.ItemId, avatarSizeType: AvatarSizeType.Medium)
                    </div>
                    <div class="fw-js1">
                        <div class="fname">
                            ID:@item.UserId.ToString().Substring(item.UserId.ToString().Length - 9)  @user.Profile.Gender.EnumMetadataDisplay()
                            @*<a href="@item.DetailUrl" title="@item.ItemName" target="_blank" class="f14 mr-5 fl">
                               
                            </a>*@
                        </div>
                        <p @*class="f12 f-c1 mt-5"*@>@(user.CalculateAgeCorrect(user.Profile.Birthday,DateTime.Now))岁 &nbsp;&nbsp;@(string.IsNullOrEmpty(user.Basecase.Height)?"未填写":user.Basecase.Height+"cm") &nbsp;&nbsp;  </p>
                        <p>@(string.IsNullOrEmpty(user.Profile.NowAreaCode) ? "未填写" : user.Profile.NowAreaCode)</p>
                        <p> @(user.Profile.EducationExperience == null || user.Profile.EducationExperience.Count() <= 0 ? "未填写" : user.Profile.EducationExperience.First().AsEditModel().Degree.EnumMetadataDisplay()) &nbsp;&nbsp; @(user.Basecase == null || string.IsNullOrEmpty(user.Basecase.Salary) ? "未填写" : user.Basecase.Salary)</p>@*<a href="/Channel/ZMemberDetail.aspx?spaceKey=@user.UserName" target="_blank" class="fr">查看>></a>*@
                    </div>
                </div>
                }
                <!--缘分天天结束-->
}
            </div>
@*<div class="tn-box tn-widget tn-widget-content tn-corner-all tnc-recommended-users">
    <div class="tn-box-header tn-widget-header tn-corner-top tn-border-bottom">
        <div class="tn-option">
            @if (new Authorizer().RecommendItem_Manage(TenantTypeIds.Instance().User()))
            {
                <a href="@SiteUrls.Instance()._ManageRecommendItems("00001101", false)" plugin="dialog">
                    管理</a>
            }
        </div>
        <h3 class="tn-helper-reset">
            推荐用户</h3>
    </div>
    <div class="tn-box-content tn-widget-content tn-corner-bottom">
            <ul class="tn-list">
                @foreach (var item in Model)
                {
                    var user = item.GetFullUser();
                    if (user == null)
                    {
                        continue;
                    }  
                    <li class="tn-list-item tn-helper-clearfix tn-border-gray tn-border-bottom tn-border-dashed">
                        <div class="tn-list-item-area-left">
                            @Html.ShowUserAvatar(item.ItemId, avatarSizeType: AvatarSizeType.Small)
                        </div>
                        <div class="tn-list-item-area-main">
                            <div class="tn-list-item-row tn-list-item-heading">
                                @if (!item.IsLink)
                                { 
                                    @Html.FollowUser(user.UserId, "加收藏")
                                }
                                <h5 class="tn-helper-reset">
                                    <a href="@item.DetailUrl" title="@item.ItemName" target="_blank">
                                        @item.ItemName</a>
                                </h5>
                            </div>
                            @if (!item.IsLink)
                            { 
                                <div class="tn-list-item-row tn-list-item-summary">
                                    <p>@HtmlUtility.TrimHtml(user.Profile.Introduction, 20)</p>
                                </div>
                            }
                        </div>
                    </li>
                }
            </ul>           
        
       
    </div>
</div>*@
